/** js 数据类型
 * 基本数据类型：undefined, null, boolean, number, string, symbol, bigint
 * 引用数据类型：Array、Object、Function
 */

/** 数据类型判断
 * 1.typeof: undefined, boolean, number, bigint, string, symbol, function, object
 * 2.Object.prototype.toString.call()
 * */
console.log(typeof undefined); // undefined
console.log(typeof null); // object
console.log(typeof true); // boolean
console.log(typeof 123); // number
console.log(typeof ""); // string
console.log(typeof function () {}); // function
console.log(typeof Symbol()); // symbol
console.log(typeof 2n); // bigint

console.log(Object.prototype.toString.call({})); // [object Object]
console.log(Object.prototype.toString.call(123)); // [object Number]
console.log(Object.prototype.toString.call(new Map())); // [object Map]
console.log(Object.prototype.toString.call(new Date())); // [object Date]
